/*
 *
 * JPress版微信小程序
 *
 */
const jpress = require('./utils/jpress.js')

App({

    onLaunch: function () {
      //jpress 初始化
      jpress.init({
          host:jpress.config.host,
          app_id:jpress.config.app_id,
          app_secret:jpress.config.app_secret
      })

      jpress.getAppName().then(data => {
          if (data.value) {
            this.globalData.appName = data.value;
          }
      })

      jpress.getCopyright().then(data => {
          if (data.value) {
            this.globalData.copyright = data.value
          }
      })

  },
  globalData:{
    userInfo:null,
    openId:'',
    isGetUserInfo:false,
    isGetopenId:false,
    appName: '',
    copyright:''
  }
})